package com.yn.common.enums;

/**
 * 转运订单订单状态
 **/
public enum EnumZyOrderStatus {
    // 0：待付款 1:待接单,2:已接单,3:已取消,4:已上车,5:已送达，6:待评价 7已评价)"
    DFK("待付款",0),
    DJD("待接单",1),
    YJD("已接单",2),
    YQX("已取消",3),
    YSC("已上车",4),
    YSD("已送达",5),
    DPJ("待评价",6),
    YPJ("已评价",7),
    ;

    private String name;
    private Integer code;

    EnumZyOrderStatus(String name, Integer code) {
        this.name = name;
        this.code = code;
    }
    public static EnumZyOrderStatus getByCode(Integer code) {
        if (null == code) {
            return null;
        }
        for (EnumZyOrderStatus auditStatusEnum : EnumZyOrderStatus.values()) {
            if (auditStatusEnum.getCode() == code) {
                return auditStatusEnum;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
